﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;
using System.Threading;

namespace MoviesWebsite.Authentication
{
    public class TestingModule : IHttpModule
    {
        public void Init(HttpApplication context)
        {
            context.AuthenticateRequest +=
               new EventHandler(context_AuthenticateRequest);
        }
        void context_AuthenticateRequest(object sender, EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;
            app.Context.User = new GenericPrincipal(
                new GenericIdentity("alexj"),
                new string[] { }
            );
        }
        public void Dispose() { }
    }
}